package com.fub.positioning;
import java.util.Comparator;


public class ReferencePointComperator implements Comparator<ReferencePoint> {
	@Override
	public int compare(ReferencePoint rp1, ReferencePoint rp2) {
		if (rp1.getDistanceToCurrentPosition() < rp2
				.getDistanceToCurrentPosition()) {
			return -1;
		}
		if (rp1.getDistanceToCurrentPosition() > rp2
				.getDistanceToCurrentPosition()) {
			return 1;
		}
		return 0;
	}
}